home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
9-Digit Zip Code Directory
/
9-Digit Zip Code Directory (American Business Information) (ABIZIP-12).ISO
/
z4src.zip
/
CLMUTEX.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1993-07-15
|
3KB
|
81 lines
//----------------------------------------------------------------------------
// MODULE DESCRIPTION
//
// Module: clmutex.hpp
// Title: C++ Class Libraries
// Notice: John M. Weeder
// Copyright (c) 1993. All rights reserved.
// This module contains proprietary information and should be
// treated as confidential.
//
//----------------------------------------------------------------------------
// MAINTENANCE HISTORY
//
// $Workfile$
// $Revision$
// $Author$
// $Date$
// $Log$
//
//----------------------------------------------------------------------------
// MODULE NARRATIVE
//
// This module contains code for the class XXX.
//
// The code in this module may be written in C++ or C.
//
// This module is portable to:
// DOS 3.X+
// MS Windows 3.X+
// OS/2 2.X+
// OS/2 2.0 PM
//
// The following compilers are supported:
// MSC 6.0A
// MSC/C++ 7.0
// Borland C++ 3.1 for DOS
// Borland C++ 1.0 for OS/2 2.X
//
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
// Class CL_MUTEX
//----------------------------------------------------------------------------
#define CL_MUTEX_PARENT CL_OBJECT
class CLASSTYPE CL_MUTEX : public CL_MUTEX_PARENT
{
#if OS_OS2
HMTX hmtx; // Semaphore
TID tid; // Owning thread, 0 = none
SIZET cLock; // Number of times locked by this thread
BOOL fCreate; // Semaphore created
#endif
public:
FN_M CL_MUTEX();
FN_M CL_MUTEX(RCCL_MUTEX);
virtual FN_M ~CL_MUTEX();
virtual BOOL FN_M Destroy(BOOL = TRUE);
virtual BOOL FN_M Initialize(SHORT = CL_INIT_ALL);
virtual BOOL FN_M IsError() const;
virtual BOOL FN_M IsValid() const;
RCCL_MUTEX FN_M operator=(RCCL_MUTEX);
BOOL FN_M Release();
BOOL FN_M Request(LONG = -1);
virtual BOOL FN_M Retrieve(PCSZ, PCSZ = NULL);
virtual BOOL FN_M Store(PCSZ, PCSZ = NULL);
#if COMPILE_DEBUG
static VOID FN_M Print(PCCL_MUTEX = NULL, PCSZ = NULL, SIZET = 0);
static BOOL FN_M Test(SHORT = 0);
#endif
protected:
private:
};
//----------------------------------------------------------------------------
//------------------------------- End of File --------------------------------
//----------------------------------------------------------------------------